#ifndef DYN_INTERPOLATION_POLY_H
#define DYN_INTERPOLATION_POLY_H

#include "dyn_interpolation.h"

/*! \author Joey Dumont
 *
 *  \date 2012-10-05
 *
 *  \brief Implementation of Neville's algorithm for polynomial interpolation.
 *
 * We employ Neville's algorithn (see Numerical Recipes, 2007,
 * Press et al., Section 3.2 for details) to compute the
 * coefficients of a polynomial interpolation of order
 * \f$M-1\f$.
 */

class PolyInterpolation : public Interpolation
{
public:
    /*! Constructor defines the basic variables. */
    PolyInterpolation(colvec _xValues,
                      colvec _yValues,
                      int _interPoints);

    /*! Re-declared pure virtual function. */
    double rawInterpolation(int _index, double x);

    /*! @name Accessor Functions */
    //@{
    double getError(){return error;}
    void setError(double _error){error=_error;}
    //"}

protected:
    /*! Error on interpolation data. */
    double error;
};

#endif // DYN_INTERPOLATION_POLY_H
